package base.exa13;

public class AbstractClassStudy {

    protected static class ProtectedClass{

        public void eat() {
            System.out.println("can eat chili");
        }

        public ProtectedClass() {
            System.out.println("hehehe");

        }
    }

    static class friendClass{
        public void eat() {
            System.out.println("can eat chili");
        }
    }

    public static void main(String[] args) {
        Skills skills = new ChinesePeople();
        skills.eat();
        skills.say();
        Skills skills1 = new EnglishPeople();
        skills1.eat();
        skills1.say();
    }

}

abstract class Skills{

    private int num;

    protected int age;

    public int num2;

    static int num4 = 2200;

    public Skills(){
        num = 100;
        age = 20;
        num2 = 300;
    }

    public abstract void eat();

    public abstract void say();

    public void sayOne(){
        System.out.println("I said: "+num);
    }

    public static void sayTwo() {
        System.out.println("Two");
    }


    public static void main(String[] args) {
        sayTwo();
    }


}

class ChinesePeople extends Skills {

    @Override
    public void eat() {
        System.out.println("can eat chili");
    }

    @Override
    public void say() {
        System.out.println("can say chinese");

    }
}

class EnglishPeople extends Skills{

    @Override
    public void eat() {
        System.out.println("can eat hamburger");
    }

    @Override
    public void say() {
        System.out.println("can say english");
    }
}


